//
//  ViewController.m
//  PageTitleContent
//
//  Created by 好米有易 on 2017/9/13.
//  Copyright © 2017年 好米有易. All rights reserved.
//

#import "ViewController.h"
#import "PageTitleContentView.h"
#import "PageOneViewController.h"
#import "PageTwoViewController.h"
#import "PageThreeViewController.h"
#import "PageContenModel.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"开发功能分类";
    
    PageTitleContentView *pageTitleContentV = [[PageTitleContentView alloc] initWithFrame:CGRectMake(0, 88, self.view.bounds.size.width, self.view.bounds.size.height - 88)];
    
    NSArray *arry = @[@{@"title":@"ios", @"controllerName":@"PageOneViewController"},
                      @{@"title":@"android", @"controllerName":@"PageTwoViewController"},
                      @{@"title":@"java", @"controllerName":@"PageThreeViewController"}];
    
    NSMutableArray *mArr = [NSMutableArray arrayWithCapacity:3];
    
    [arry enumerateObjectsUsingBlock:^(NSDictionary *obj, NSUInteger idx, BOOL * _Nonnull stop) {
        
        PageContenModel *model = [[PageContenModel alloc] initWithDictionary:obj];;
        
        [mArr addObject:model];
        
    }];
    
    pageTitleContentV.infos = mArr.copy;
    
    [self.view addSubview:pageTitleContentV];
    
}



@end
